/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Version : 50163
 Source Host           : localhost
 Source Database       : xiaomin

 Target Server Version : 50163
 File Encoding         : utf-8

 Date: 07/08/2018 22:15:36 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `qrtz_blob_triggers`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_blob_triggers`;
CREATE TABLE `qrtz_blob_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `BLOB_DATA` blob,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qrtz_calendars`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_calendars`;
CREATE TABLE `qrtz_calendars` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `CALENDAR_NAME` varchar(200) NOT NULL,
  `CALENDAR` blob NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qrtz_cron_triggers`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_cron_triggers`;
CREATE TABLE `qrtz_cron_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `CRON_EXPRESSION` varchar(120) NOT NULL,
  `TIME_ZONE_ID` varchar(80) DEFAULT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qrtz_cron_triggers`
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_cron_triggers` VALUES ('RenrenScheduler', 'TASK_1', 'DEFAULT', '0 0/30 * * * ?', 'Asia/Shanghai'), ('RenrenScheduler', 'TASK_2', 'DEFAULT', '0 0/30 * * * ?', 'Asia/Shanghai');
COMMIT;

-- ----------------------------
--  Table structure for `qrtz_fired_triggers`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_fired_triggers`;
CREATE TABLE `qrtz_fired_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `ENTRY_ID` varchar(95) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `INSTANCE_NAME` varchar(200) NOT NULL,
  `FIRED_TIME` bigint(13) NOT NULL,
  `SCHED_TIME` bigint(13) NOT NULL,
  `PRIORITY` int(11) NOT NULL,
  `STATE` varchar(16) NOT NULL,
  `JOB_NAME` varchar(200) DEFAULT NULL,
  `JOB_GROUP` varchar(200) DEFAULT NULL,
  `IS_NONCONCURRENT` varchar(1) DEFAULT NULL,
  `REQUESTS_RECOVERY` varchar(1) DEFAULT NULL,
  PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
  KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
  KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
  KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
  KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qrtz_job_details`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_job_details`;
CREATE TABLE `qrtz_job_details` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `JOB_NAME` varchar(200) NOT NULL,
  `JOB_GROUP` varchar(200) NOT NULL,
  `DESCRIPTION` varchar(250) DEFAULT NULL,
  `JOB_CLASS_NAME` varchar(250) NOT NULL,
  `IS_DURABLE` varchar(1) NOT NULL,
  `IS_NONCONCURRENT` varchar(1) NOT NULL,
  `IS_UPDATE_DATA` varchar(1) NOT NULL,
  `REQUESTS_RECOVERY` varchar(1) NOT NULL,
  `JOB_DATA` blob,
  PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
  KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qrtz_job_details`
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_job_details` VALUES ('RenrenScheduler', 'TASK_1', 'DEFAULT', null, 'io.renren.modules.job.utils.ScheduleJob', '0', '0', '0', '0', 0xaced0005737200156f72672e71756172747a2e4a6f62446174614d61709fb083e8bfa9b0cb020000787200266f72672e71756172747a2e7574696c732e537472696e674b65794469727479466c61674d61708208e8c3fbc55d280200015a0013616c6c6f77735472616e7369656e74446174617872001d6f72672e71756172747a2e7574696c732e4469727479466c61674d617013e62ead28760ace0200025a000564697274794c00036d617074000f4c6a6176612f7574696c2f4d61703b787001737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000174000d4a4f425f504152414d5f4b45597372002e696f2e72656e72656e2e6d6f64756c65732e6a6f622e656e746974792e5363686564756c654a6f62456e7469747900000000000000010200084c00086265616e4e616d657400124c6a6176612f6c616e672f537472696e673b4c000a63726561746554696d657400104c6a6176612f7574696c2f446174653b4c000e63726f6e45787072657373696f6e71007e00094c00056a6f6249647400104c6a6176612f6c616e672f4c6f6e673b4c000a6d6574686f644e616d6571007e00094c0006706172616d7371007e00094c000672656d61726b71007e00094c00067374617475737400134c6a6176612f6c616e672f496e74656765723b7870740008746573745461736b7372000e6a6176612e7574696c2e44617465686a81014b5974190300007870770800000158baf593307874000e3020302f3330202a202a202a203f7372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b020000787000000000000000017400047465737474000672656e72656e74000fe69c89e58f82e695b0e6b58be8af95737200116a6176612e6c616e672e496e746567657212e2a0a4f781873802000149000576616c75657871007e0013000000007800), ('RenrenScheduler', 'TASK_2', 'DEFAULT', null, 'io.renren.modules.job.utils.ScheduleJob', '0', '0', '0', '0', 0xaced0005737200156f72672e71756172747a2e4a6f62446174614d61709fb083e8bfa9b0cb020000787200266f72672e71756172747a2e7574696c732e537472696e674b65794469727479466c61674d61708208e8c3fbc55d280200015a0013616c6c6f77735472616e7369656e74446174617872001d6f72672e71756172747a2e7574696c732e4469727479466c61674d617013e62ead28760ace0200025a000564697274794c00036d617074000f4c6a6176612f7574696c2f4d61703b787001737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000174000d4a4f425f504152414d5f4b45597372002e696f2e72656e72656e2e6d6f64756c65732e6a6f622e656e746974792e5363686564756c654a6f62456e7469747900000000000000010200084c00086265616e4e616d657400124c6a6176612f6c616e672f537472696e673b4c000a63726561746554696d657400104c6a6176612f7574696c2f446174653b4c000e63726f6e45787072657373696f6e71007e00094c00056a6f6249647400104c6a6176612f6c616e672f4c6f6e673b4c000a6d6574686f644e616d6571007e00094c0006706172616d7371007e00094c000672656d61726b71007e00094c00067374617475737400134c6a6176612f6c616e672f496e74656765723b7870740008746573745461736b7372000e6a6176612e7574696c2e44617465686a81014b5974190300007870770800000158c377c4607874000e3020302f3330202a202a202a203f7372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b0200007870000000000000000274000574657374327074000fe697a0e58f82e695b0e6b58be8af95737200116a6176612e6c616e672e496e746567657212e2a0a4f781873802000149000576616c75657871007e0013000000017800);
COMMIT;

-- ----------------------------
--  Table structure for `qrtz_locks`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_locks`;
CREATE TABLE `qrtz_locks` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `LOCK_NAME` varchar(40) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qrtz_locks`
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_locks` VALUES ('RenrenScheduler', 'STATE_ACCESS'), ('RenrenScheduler', 'TRIGGER_ACCESS');
COMMIT;

-- ----------------------------
--  Table structure for `qrtz_paused_trigger_grps`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
CREATE TABLE `qrtz_paused_trigger_grps` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qrtz_scheduler_state`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_scheduler_state`;
CREATE TABLE `qrtz_scheduler_state` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `INSTANCE_NAME` varchar(200) NOT NULL,
  `LAST_CHECKIN_TIME` bigint(13) NOT NULL,
  `CHECKIN_INTERVAL` bigint(13) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qrtz_scheduler_state`
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_scheduler_state` VALUES ('RenrenScheduler', 'liuyonggangdeMacBook-Air.local1531033467118', '1531033970513', '15000');
COMMIT;

-- ----------------------------
--  Table structure for `qrtz_simple_triggers`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simple_triggers`;
CREATE TABLE `qrtz_simple_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `REPEAT_COUNT` bigint(7) NOT NULL,
  `REPEAT_INTERVAL` bigint(12) NOT NULL,
  `TIMES_TRIGGERED` bigint(10) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qrtz_simprop_triggers`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
CREATE TABLE `qrtz_simprop_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `STR_PROP_1` varchar(512) DEFAULT NULL,
  `STR_PROP_2` varchar(512) DEFAULT NULL,
  `STR_PROP_3` varchar(512) DEFAULT NULL,
  `INT_PROP_1` int(11) DEFAULT NULL,
  `INT_PROP_2` int(11) DEFAULT NULL,
  `LONG_PROP_1` bigint(20) DEFAULT NULL,
  `LONG_PROP_2` bigint(20) DEFAULT NULL,
  `DEC_PROP_1` decimal(13,4) DEFAULT NULL,
  `DEC_PROP_2` decimal(13,4) DEFAULT NULL,
  `BOOL_PROP_1` varchar(1) DEFAULT NULL,
  `BOOL_PROP_2` varchar(1) DEFAULT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qrtz_triggers`
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_triggers`;
CREATE TABLE `qrtz_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `JOB_NAME` varchar(200) NOT NULL,
  `JOB_GROUP` varchar(200) NOT NULL,
  `DESCRIPTION` varchar(250) DEFAULT NULL,
  `NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
  `PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
  `PRIORITY` int(11) DEFAULT NULL,
  `TRIGGER_STATE` varchar(16) NOT NULL,
  `TRIGGER_TYPE` varchar(8) NOT NULL,
  `START_TIME` bigint(13) NOT NULL,
  `END_TIME` bigint(13) DEFAULT NULL,
  `CALENDAR_NAME` varchar(200) DEFAULT NULL,
  `MISFIRE_INSTR` smallint(2) DEFAULT NULL,
  `JOB_DATA` blob,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
  KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
  KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),
  KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),
  KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),
  KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`),
  KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
  KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
  KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`),
  KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`),
  KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
  KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
  KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
  CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `qrtz_job_details` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qrtz_triggers`
-- ----------------------------
BEGIN;
INSERT INTO `qrtz_triggers` VALUES ('RenrenScheduler', 'TASK_1', 'DEFAULT', 'TASK_1', 'DEFAULT', null, '1529852400000', '-1', '5', 'PAUSED', 'CRON', '1529851956000', '0', null, '2', 0xaced0005737200156f72672e71756172747a2e4a6f62446174614d61709fb083e8bfa9b0cb020000787200266f72672e71756172747a2e7574696c732e537472696e674b65794469727479466c61674d61708208e8c3fbc55d280200015a0013616c6c6f77735472616e7369656e74446174617872001d6f72672e71756172747a2e7574696c732e4469727479466c61674d617013e62ead28760ace0200025a000564697274794c00036d617074000f4c6a6176612f7574696c2f4d61703b787001737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000174000d4a4f425f504152414d5f4b45597372002e696f2e72656e72656e2e6d6f64756c65732e6a6f622e656e746974792e5363686564756c654a6f62456e7469747900000000000000010200084c00086265616e4e616d657400124c6a6176612f6c616e672f537472696e673b4c000a63726561746554696d657400104c6a6176612f7574696c2f446174653b4c000e63726f6e45787072657373696f6e71007e00094c00056a6f6249647400104c6a6176612f6c616e672f4c6f6e673b4c000a6d6574686f644e616d6571007e00094c0006706172616d7371007e00094c000672656d61726b71007e00094c00067374617475737400134c6a6176612f6c616e672f496e74656765723b7870740008746573745461736b7372000e6a6176612e7574696c2e44617465686a81014b5974190300007870770800000158baf593307874000e3020302f3330202a202a202a203f7372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b020000787000000000000000017400047465737474000672656e72656e74000fe69c89e58f82e695b0e6b58be8af95737200116a6176612e6c616e672e496e746567657212e2a0a4f781873802000149000576616c75657871007e0013000000017800), ('RenrenScheduler', 'TASK_2', 'DEFAULT', 'TASK_2', 'DEFAULT', null, '1529852400000', '-1', '5', 'PAUSED', 'CRON', '1529851956000', '0', null, '2', 0xaced0005737200156f72672e71756172747a2e4a6f62446174614d61709fb083e8bfa9b0cb020000787200266f72672e71756172747a2e7574696c732e537472696e674b65794469727479466c61674d61708208e8c3fbc55d280200015a0013616c6c6f77735472616e7369656e74446174617872001d6f72672e71756172747a2e7574696c732e4469727479466c61674d617013e62ead28760ace0200025a000564697274794c00036d617074000f4c6a6176612f7574696c2f4d61703b787001737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000174000d4a4f425f504152414d5f4b45597372002e696f2e72656e72656e2e6d6f64756c65732e6a6f622e656e746974792e5363686564756c654a6f62456e7469747900000000000000010200084c00086265616e4e616d657400124c6a6176612f6c616e672f537472696e673b4c000a63726561746554696d657400104c6a6176612f7574696c2f446174653b4c000e63726f6e45787072657373696f6e71007e00094c00056a6f6249647400104c6a6176612f6c616e672f4c6f6e673b4c000a6d6574686f644e616d6571007e00094c0006706172616d7371007e00094c000672656d61726b71007e00094c00067374617475737400134c6a6176612f6c616e672f496e74656765723b7870740008746573745461736b7372000e6a6176612e7574696c2e44617465686a81014b5974190300007870770800000158c377c4607874000e3020302f3330202a202a202a203f7372000e6a6176612e6c616e672e4c6f6e673b8be490cc8f23df0200014a000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b0200007870000000000000000274000574657374327074000fe697a0e58f82e695b0e6b58be8af95737200116a6176612e6c616e672e496e746567657212e2a0a4f781873802000149000576616c75657871007e0013000000017800);
COMMIT;

-- ----------------------------
--  Table structure for `schedule_job`
-- ----------------------------
DROP TABLE IF EXISTS `schedule_job`;
CREATE TABLE `schedule_job` (
  `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务id',
  `bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
  `method_name` varchar(100) DEFAULT NULL COMMENT '方法名',
  `params` varchar(2000) DEFAULT NULL COMMENT '参数',
  `cron_expression` varchar(100) DEFAULT NULL COMMENT 'cron表达式',
  `status` tinyint(4) DEFAULT NULL COMMENT '任务状态  0：正常  1：暂停',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`job_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='定时任务';

-- ----------------------------
--  Records of `schedule_job`
-- ----------------------------
BEGIN;
INSERT INTO `schedule_job` VALUES ('1', 'testTask', 'test', 'renren', '0 0/30 * * * ?', '1', '有参数测试', '2016-12-01 23:16:46'), ('2', 'testTask', 'test2', null, '0 0/30 * * * ?', '1', '无参数测试', '2016-12-03 14:55:56');
COMMIT;

-- ----------------------------
--  Table structure for `schedule_job_log`
-- ----------------------------
DROP TABLE IF EXISTS `schedule_job_log`;
CREATE TABLE `schedule_job_log` (
  `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志id',
  `job_id` bigint(20) NOT NULL COMMENT '任务id',
  `bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
  `method_name` varchar(100) DEFAULT NULL COMMENT '方法名',
  `params` varchar(2000) DEFAULT NULL COMMENT '参数',
  `status` tinyint(4) NOT NULL COMMENT '任务状态    0：成功    1：失败',
  `error` varchar(2000) DEFAULT NULL COMMENT '失败信息',
  `times` int(11) NOT NULL COMMENT '耗时(单位：毫秒)',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`log_id`),
  KEY `job_id` (`job_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='定时任务日志';

-- ----------------------------
--  Records of `schedule_job_log`
-- ----------------------------
BEGIN;
INSERT INTO `schedule_job_log` VALUES ('1', '1', 'testTask', 'test', 'renren', '0', null, '1208', '2018-06-24 23:00:01');
COMMIT;

-- ----------------------------
--  Table structure for `sys_config`
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `param_key` varchar(50) DEFAULT NULL COMMENT 'key',
  `param_value` varchar(2000) DEFAULT NULL COMMENT 'value',
  `status` tinyint(4) DEFAULT '1' COMMENT '状态   0：隐藏   1：显示',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  UNIQUE KEY `param_key` (`param_key`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='系统配置信息表';

-- ----------------------------
--  Records of `sys_config`
-- ----------------------------
BEGIN;
INSERT INTO `sys_config` VALUES ('1', 'CLOUD_STORAGE_CONFIG_KEY', '{\"type\":2,\"qiniuDomain\":\"http://pau2ms0gu.bkt.clouddn.com\",\"qiniuPrefix\":\"upload\",\"qiniuAccessKey\":\"6cIfcIV6BQcQqaeJsWHaq0cdyepY7DcHbN3p4QII\",\"qiniuSecretKey\":\"zKBmxmmAgShP69xB0Q0rLNwOJzSPlJpAB-IwYMYj\",\"qiniuBucketName\":\"xiaomin\",\"aliyunDomain\":\"https://liuyonggang-image.oss-cn-beijing.aliyuncs.com\",\"aliyunPrefix\":\"upload\",\"aliyunEndPoint\":\"oss-cn-beijing.aliyuncs.com\",\"aliyunAccessKeyId\":\"8BhhxxZAlQikVFFy\",\"aliyunAccessKeySecret\":\"FT0tPOlXCqfcMqLvoSD10WHVgleQ5M\",\"aliyunBucketName\":\"liuyonggang-image\",\"qcloudDomain\":\"\",\"qcloudPrefix\":\"\",\"qcloudSecretId\":\"\",\"qcloudSecretKey\":\"\",\"qcloudBucketName\":\"\"}', '0', '云存储配置信息');
COMMIT;

-- ----------------------------
--  Table structure for `sys_dept`
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
  `dept_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `parent_id` bigint(20) DEFAULT NULL COMMENT '上级部门ID，一级部门为0',
  `name` varchar(50) DEFAULT NULL COMMENT '部门名称',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `del_flag` tinyint(4) DEFAULT '0' COMMENT '是否删除  -1：已删除  0：正常',
  PRIMARY KEY (`dept_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='部门管理';

-- ----------------------------
--  Records of `sys_dept`
-- ----------------------------
BEGIN;
INSERT INTO `sys_dept` VALUES ('1', '0', '晓敏按摩(漯河)总公司', '0', '0'), ('2', '1', '长沙分公司', '1', '0'), ('3', '1', '上海分公司', '2', '0'), ('4', '1', '杭州分公司', '3', '0'), ('5', '1', '武汉分公司', '4', '0');
COMMIT;

-- ----------------------------
--  Table structure for `sys_dict`
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL COMMENT '字典名称',
  `type` varchar(100) NOT NULL COMMENT '字典类型',
  `code` varchar(100) NOT NULL COMMENT '字典码',
  `value` varchar(1000) NOT NULL COMMENT '字典值',
  `order_num` int(11) DEFAULT '0' COMMENT '排序',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `del_flag` tinyint(4) DEFAULT '0' COMMENT '删除标记  -1：已删除  0：正常',
  PRIMARY KEY (`id`),
  UNIQUE KEY `type` (`type`,`code`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='数据字典表';

-- ----------------------------
--  Records of `sys_dict`
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict` VALUES ('1', '性别', 'sex', '0', '女', '0', null, '0'), ('2', '性别', 'sex', '1', '男', '1', null, '0'), ('3', '性别', 'sex', '2', '未知', '3', null, '0');
COMMIT;

-- ----------------------------
--  Table structure for `sys_log`
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) DEFAULT NULL COMMENT '用户名',
  `operation` varchar(50) DEFAULT NULL COMMENT '用户操作',
  `method` varchar(200) DEFAULT NULL COMMENT '请求方法',
  `params` varchar(5000) DEFAULT NULL COMMENT '请求参数',
  `time` bigint(20) NOT NULL COMMENT '执行时长(毫秒)',
  `ip` varchar(64) DEFAULT NULL COMMENT 'IP地址',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='系统日志';

-- ----------------------------
--  Records of `sys_log`
-- ----------------------------
BEGIN;
INSERT INTO `sys_log` VALUES ('1', 'admin', '暂停定时任务', 'io.renren.modules.job.controller.ScheduleJobController.pause()', '[1]', '995', '0:0:0:0:0:0:0:1', '2018-06-24 23:02:37'), ('2', 'admin', '暂停定时任务', 'io.renren.modules.job.controller.ScheduleJobController.pause()', '[1]', '395', '0:0:0:0:0:0:0:1', '2018-06-24 23:02:38'), ('3', 'admin', '修改用户', 'io.renren.modules.sys.controller.SysUserController.update()', '{\"userId\":1,\"username\":\"admin\",\"salt\":\"YzcmCZNvbXocrsz9dm8e\",\"email\":\"544872316@qq.com\",\"mobile\":\"13612345678\",\"status\":1,\"roleIdList\":[],\"createTime\":\"Nov 11, 2016 11:11:11 AM\",\"deptId\":1,\"deptName\":\"人人开源集团\"}', '349', '0:0:0:0:0:0:0:1', '2018-06-24 23:35:27'), ('4', 'admin', '保存用户', 'io.renren.modules.sys.controller.SysUserController.save()', '{\"userId\":2,\"username\":\"xiaomin\",\"password\":\"77dd58c5844844c2247f5641510aa6039048ec362dd0f3cb5229f4bdbb13f196\",\"salt\":\"tFcnuPVv7Ny7BQsEO3eg\",\"email\":\"xiaomin@liuyonggang.com\",\"mobile\":\"131111111111\",\"status\":1,\"roleIdList\":[],\"createTime\":\"Jun 28, 2018 4:08:49 PM\",\"deptId\":1,\"deptName\":\"晓敏按摩(漯河)总公司\"}', '53', '0:0:0:0:0:0:0:1', '2018-06-28 16:08:49'), ('5', 'admin', '保存角色', 'io.renren.modules.sys.controller.SysRoleController.save()', '{\"roleId\":1,\"roleName\":\"管理员\",\"deptId\":1,\"deptName\":\"晓敏按摩(漯河)总公司\",\"menuIdList\":[1,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65],\"deptIdList\":[1],\"createTime\":\"Jun 28, 2018 4:10:19 PM\"}', '70', '0:0:0:0:0:0:0:1', '2018-06-28 16:10:19'), ('6', 'admin', '修改用户', 'io.renren.modules.sys.controller.SysUserController.update()', '{\"userId\":2,\"username\":\"xiaomin\",\"salt\":\"tFcnuPVv7Ny7BQsEO3eg\",\"email\":\"xiaomin@liuyonggang.com\",\"mobile\":\"131111111111\",\"status\":1,\"roleIdList\":[1],\"createTime\":\"Jun 28, 2018 4:08:49 PM\",\"deptId\":1,\"deptName\":\"晓敏按摩(漯河)总公司\"}', '21', '0:0:0:0:0:0:0:1', '2018-06-28 16:10:30'), ('7', 'admin', '修改角色', 'io.renren.modules.sys.controller.SysRoleController.update()', '{\"roleId\":1,\"roleName\":\"管理员\",\"deptId\":1,\"deptName\":\"晓敏按摩(漯河)总公司\",\"menuIdList\":[1,46,47,48,49,51,52,53,54,56,57,58,59,61,62,63,64],\"deptIdList\":[1],\"createTime\":\"Jun 28, 2018 4:10:19 PM\"}', '248', '0:0:0:0:0:0:0:1', '2018-07-08 11:58:04'), ('8', 'admin', '保存菜单', 'io.renren.modules.sys.controller.SysMenuController.save()', '{\"menuId\":66,\"parentId\":46,\"parentName\":\"客户表\",\"name\":\"充值\",\"perms\":\"xm:customer:recharge\",\"type\":2,\"orderNum\":0}', '15', '0:0:0:0:0:0:0:1', '2018-07-08 12:19:28'), ('9', 'admin', '保存菜单', 'io.renren.modules.sys.controller.SysMenuController.save()', '{\"menuId\":67,\"parentId\":46,\"parentName\":\"客户表\",\"name\":\"消费\",\"perms\":\"xm:customer:pay\",\"type\":2,\"orderNum\":0}', '6', '0:0:0:0:0:0:0:1', '2018-07-08 12:20:18'), ('10', 'admin', '修改角色', 'io.renren.modules.sys.controller.SysRoleController.update()', '{\"roleId\":1,\"roleName\":\"管理员\",\"deptId\":1,\"deptName\":\"晓敏按摩(漯河)总公司\",\"menuIdList\":[1,46,47,48,49,66,67,51,52,53,54,56,57,58,59,61,62,63,64],\"deptIdList\":[1],\"createTime\":\"Jun 28, 2018 4:10:19 PM\"}', '43', '0:0:0:0:0:0:0:1', '2018-07-08 12:20:35');
COMMIT;

-- ----------------------------
--  Table structure for `sys_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `menu_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `parent_id` bigint(20) DEFAULT NULL COMMENT '父菜单ID，一级菜单为0',
  `name` varchar(50) DEFAULT NULL COMMENT '菜单名称',
  `url` varchar(200) DEFAULT NULL COMMENT '菜单URL',
  `perms` varchar(500) DEFAULT NULL COMMENT '授权(多个用逗号分隔，如：user:list,user:create)',
  `type` int(11) DEFAULT NULL COMMENT '类型   0：目录   1：菜单   2：按钮',
  `icon` varchar(50) DEFAULT NULL COMMENT '菜单图标',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8 COMMENT='菜单管理';

-- ----------------------------
--  Records of `sys_menu`
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES ('1', '0', '系统管理', null, null, '0', 'fa fa-cog', '0'), ('2', '1', '管理员管理', 'modules/sys/user.html', null, '1', 'fa fa-user', '1'), ('3', '1', '角色管理', 'modules/sys/role.html', null, '1', 'fa fa-user-secret', '2'), ('4', '1', '菜单管理', 'modules/sys/menu.html', null, '1', 'fa fa-th-list', '3'), ('5', '1', 'SQL监控', 'druid/sql.html', null, '1', 'fa fa-bug', '4'), ('6', '1', '定时任务', 'modules/job/schedule.html', null, '1', 'fa fa-tasks', '5'), ('7', '6', '查看', null, 'sys:schedule:list,sys:schedule:info', '2', null, '0'), ('8', '6', '新增', null, 'sys:schedule:save', '2', null, '0'), ('9', '6', '修改', null, 'sys:schedule:update', '2', null, '0'), ('10', '6', '删除', null, 'sys:schedule:delete', '2', null, '0'), ('11', '6', '暂停', null, 'sys:schedule:pause', '2', null, '0'), ('12', '6', '恢复', null, 'sys:schedule:resume', '2', null, '0'), ('13', '6', '立即执行', null, 'sys:schedule:run', '2', null, '0'), ('14', '6', '日志列表', null, 'sys:schedule:log', '2', null, '0'), ('15', '2', '查看', null, 'sys:user:list,sys:user:info', '2', null, '0'), ('16', '2', '新增', null, 'sys:user:save,sys:role:select', '2', null, '0'), ('17', '2', '修改', null, 'sys:user:update,sys:role:select', '2', null, '0'), ('18', '2', '删除', null, 'sys:user:delete', '2', null, '0'), ('19', '3', '查看', null, 'sys:role:list,sys:role:info', '2', null, '0'), ('20', '3', '新增', null, 'sys:role:save,sys:menu:perms', '2', null, '0'), ('21', '3', '修改', null, 'sys:role:update,sys:menu:perms', '2', null, '0'), ('22', '3', '删除', null, 'sys:role:delete', '2', null, '0'), ('23', '4', '查看', null, 'sys:menu:list,sys:menu:info', '2', null, '0'), ('24', '4', '新增', null, 'sys:menu:save,sys:menu:select', '2', null, '0'), ('25', '4', '修改', null, 'sys:menu:update,sys:menu:select', '2', null, '0'), ('26', '4', '删除', null, 'sys:menu:delete', '2', null, '0'), ('27', '1', '参数管理', 'modules/sys/config.html', 'sys:config:list,sys:config:info,sys:config:save,sys:config:update,sys:config:delete', '1', 'fa fa-sun-o', '6'), ('29', '1', '系统日志', 'modules/sys/log.html', 'sys:log:list', '1', 'fa fa-file-text-o', '7'), ('30', '1', '文件上传', 'modules/oss/oss.html', 'sys:oss:all', '1', 'fa fa-file-image-o', '6'), ('31', '1', '部门管理', 'modules/sys/dept.html', null, '1', 'fa fa-file-code-o', '1'), ('32', '31', '查看', null, 'sys:dept:list,sys:dept:info', '2', null, '0'), ('33', '31', '新增', null, 'sys:dept:save,sys:dept:select', '2', null, '0'), ('34', '31', '修改', null, 'sys:dept:update,sys:dept:select', '2', null, '0'), ('35', '31', '删除', null, 'sys:dept:delete', '2', null, '0'), ('36', '1', '字典管理', 'modules/sys/dict.html', null, '1', 'fa fa-bookmark-o', '6'), ('37', '36', '查看', null, 'sys:dict:list,sys:dict:info', '2', null, '6'), ('38', '36', '新增', null, 'sys:dict:save', '2', null, '6'), ('39', '36', '修改', null, 'sys:dict:update', '2', null, '6'), ('40', '36', '删除', null, 'sys:dict:delete', '2', null, '6'), ('41', '1', '账户表', 'modules/xm/account.html', null, '1', 'fa fa-file-code-o', '6'), ('42', '41', '查看', null, 'xm:account:list,xm:account:info', '2', null, '6'), ('43', '41', '新增', null, 'xm:account:save', '2', null, '6'), ('44', '41', '修改', null, 'xm:account:update', '2', null, '6'), ('45', '41', '删除', null, 'xm:account:delete', '2', null, '6'), ('46', '1', '客户表', 'modules/xm/customer.html', null, '1', 'fa fa-file-code-o', '6'), ('47', '46', '查看', null, 'xm:customer:list,xm:customer:info', '2', null, '6'), ('48', '46', '新增', null, 'xm:customer:save', '2', null, '6'), ('49', '46', '修改', null, 'xm:customer:update', '2', null, '6'), ('50', '46', '删除', null, 'xm:customer:delete', '2', null, '6'), ('51', '1', '技师表', 'modules/xm/masterworker.html', null, '1', 'fa fa-file-code-o', '6'), ('52', '51', '查看', null, 'xm:masterworker:list,xm:masterworker:info', '2', null, '6'), ('53', '51', '新增', null, 'xm:masterworker:save', '2', null, '6'), ('54', '51', '修改', null, 'xm:masterworker:update', '2', null, '6'), ('55', '51', '删除', null, 'xm:masterworker:delete', '2', null, '6'), ('56', '1', '产品表', 'modules/xm/prodcategory.html', null, '1', 'fa fa-file-code-o', '6'), ('57', '56', '查看', null, 'xm:prodcategory:list,xm:prodcategory:info', '2', null, '6'), ('58', '56', '新增', null, 'xm:prodcategory:save', '2', null, '6'), ('59', '56', '修改', null, 'xm:prodcategory:update', '2', null, '6'), ('60', '56', '删除', null, 'xm:prodcategory:delete', '2', null, '6'), ('61', '1', '产品订单', 'modules/xm/orderinfo.html', null, '1', 'fa fa-file-code-o', '6'), ('62', '61', '查看', null, 'xm:orderinfo:list,xm:orderinfo:info', '2', null, '6'), ('63', '61', '新增', null, 'xm:orderinfo:save', '2', null, '6'), ('64', '61', '修改', null, 'xm:orderinfo:update', '2', null, '6'), ('65', '61', '删除', null, 'xm:orderinfo:delete', '2', null, '6'), ('66', '46', '充值', null, 'xm:customer:recharge', '2', null, '0'), ('67', '46', '消费', null, 'xm:customer:pay', '2', null, '0'), ('68', '1', '赠送项目', 'modules/xm/giftproject.html', null, '1', 'fa fa-file-code-o', '6'), ('69', '68', '查看', null, 'xm:giftproject:list,xm:giftproject:info', '2', null, '6'), ('70', '68', '新增', null, 'xm:giftproject:save', '2', null, '6'), ('71', '68', '修改', null, 'xm:giftproject:update', '2', null, '6'), ('72', '68', '删除', null, 'xm:giftproject:delete', '2', null, '6');
COMMIT;

-- ----------------------------
--  Table structure for `sys_oss`
-- ----------------------------
DROP TABLE IF EXISTS `sys_oss`;
CREATE TABLE `sys_oss` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `url` varchar(200) DEFAULT NULL COMMENT 'URL地址',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='文件上传';

-- ----------------------------
--  Records of `sys_oss`
-- ----------------------------
BEGIN;
INSERT INTO `sys_oss` VALUES ('1', 'https://liuyonggang-image.oss-cn-beijing.aliyuncs.com/upload/20180624/21e2052e363e4483a375754c6e758c48.jpeg', '2018-06-24 23:30:53'), ('2', 'http://images.liuyonggang.com/upload/20180624/6a43ef16415e4416ac7765cc599f5bc2.jpeg', '2018-06-24 23:32:00');
COMMIT;

-- ----------------------------
--  Table structure for `sys_role`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `role_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(100) DEFAULT NULL COMMENT '角色名称',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `dept_id` bigint(20) DEFAULT NULL COMMENT '部门ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='角色';

-- ----------------------------
--  Records of `sys_role`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES ('1', '管理员', null, '1', '2018-06-28 16:10:19');
COMMIT;

-- ----------------------------
--  Table structure for `sys_role_dept`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_dept`;
CREATE TABLE `sys_role_dept` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  `dept_id` bigint(20) DEFAULT NULL COMMENT '部门ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='角色与部门对应关系';

-- ----------------------------
--  Records of `sys_role_dept`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_dept` VALUES ('3', '1', '1');
COMMIT;

-- ----------------------------
--  Table structure for `sys_role_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  `menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系';

-- ----------------------------
--  Records of `sys_role_menu`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` VALUES ('44', '1', '1'), ('45', '1', '46'), ('46', '1', '47'), ('47', '1', '48'), ('48', '1', '49'), ('49', '1', '66'), ('50', '1', '67'), ('51', '1', '51'), ('52', '1', '52'), ('53', '1', '53'), ('54', '1', '54'), ('55', '1', '56'), ('56', '1', '57'), ('57', '1', '58'), ('58', '1', '59'), ('59', '1', '61'), ('60', '1', '62'), ('61', '1', '63'), ('62', '1', '64');
COMMIT;

-- ----------------------------
--  Table structure for `sys_user`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `user_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL COMMENT '用户名',
  `password` varchar(100) DEFAULT NULL COMMENT '密码',
  `salt` varchar(20) DEFAULT NULL COMMENT '盐',
  `email` varchar(100) DEFAULT NULL COMMENT '邮箱',
  `mobile` varchar(100) DEFAULT NULL COMMENT '手机号',
  `status` tinyint(4) DEFAULT NULL COMMENT '状态  0：禁用   1：正常',
  `dept_id` bigint(20) DEFAULT NULL COMMENT '部门ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='系统用户';

-- ----------------------------
--  Records of `sys_user`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES ('1', 'admin', 'e1153123d7d180ceeb820d577ff119876678732a68eef4e6ffc0b1f06a01f91b', 'YzcmCZNvbXocrsz9dm8e', '544872316@qq.com', '13612345678', '1', '1', '2016-11-11 11:11:11'), ('2', 'xiaomin', '77dd58c5844844c2247f5641510aa6039048ec362dd0f3cb5229f4bdbb13f196', 'tFcnuPVv7Ny7BQsEO3eg', 'xiaomin@liuyonggang.com', '131111111111', '1', '1', '2018-06-28 16:08:49');
COMMIT;

-- ----------------------------
--  Table structure for `sys_user_role`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户与角色对应关系';

-- ----------------------------
--  Records of `sys_user_role`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES ('1', '2', '1');
COMMIT;

-- ----------------------------
--  Table structure for `xm_account`
-- ----------------------------
DROP TABLE IF EXISTS `xm_account`;
CREATE TABLE `xm_account` (
  `customer_id` int(13) NOT NULL AUTO_INCREMENT COMMENT '客户ID',
  `vip_no` varchar(30) COLLATE utf8_bin NOT NULL COMMENT '会员开号',
  `pay_balance` double(13,2) DEFAULT '0.00' COMMENT '充值余额',
  `present_balance` double(13,2) DEFAULT '0.00' COMMENT '红包',
  `first_top_up_ti` bigint(13) DEFAULT NULL COMMENT '第一次充值时间',
  `last_top_up_ti` bigint(13) DEFAULT NULL COMMENT '最后一次充值时间',
  `first_deductions_ti` bigint(13) DEFAULT NULL COMMENT '第一次扣款时间',
  `last_deductions_ti` bigint(13) DEFAULT NULL COMMENT '最后一次扣款时间',
  `remark` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_ti` int(13) DEFAULT NULL COMMENT '创建时间',
  `create_user_id` int(13) DEFAULT NULL COMMENT '创建人',
  `modify_ti` int(13) DEFAULT NULL COMMENT '修改时间',
  `modify_user_id` int(13) DEFAULT NULL COMMENT '修改人',
  `version` int(11) DEFAULT '0' COMMENT '版本号',
  PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='账户表';

-- ----------------------------
--  Table structure for `xm_customer`
-- ----------------------------
DROP TABLE IF EXISTS `xm_customer`;
CREATE TABLE `xm_customer` (
  `id` int(13) NOT NULL AUTO_INCREMENT COMMENT '客户ID',
  `customer_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '客户姓名',
  `customer_tel` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '客户手机号码',
  `customer_email` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '客户邮箱',
  `remark` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_ti` int(13) DEFAULT NULL COMMENT '创建时间',
  `create_user_id` int(13) DEFAULT NULL COMMENT '创建人',
  `modify_ti` int(13) DEFAULT NULL COMMENT '修改时间',
  `modify_user_id` int(13) DEFAULT NULL COMMENT '修改人',
  `version` int(11) DEFAULT '0' COMMENT '版本号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='客户表';

-- ----------------------------
--  Table structure for `xm_gift_project`
-- ----------------------------
DROP TABLE IF EXISTS `xm_gift_project`;
CREATE TABLE `xm_gift_project` (
  `id` int(13) NOT NULL AUTO_INCREMENT COMMENT '赠送ID',
  `category_id` int(13) NOT NULL COMMENT '产品ID',
  `customer_id` int(13) NOT NULL COMMENT '客户ID',
  `remark` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_ti` int(13) DEFAULT NULL COMMENT '创建时间',
  `create_user_id` int(13) DEFAULT NULL COMMENT '创建人',
  `modify_ti` int(13) DEFAULT NULL COMMENT '修改时间',
  `modify_user_id` int(13) DEFAULT NULL COMMENT '修改人',
  `version` int(11) DEFAULT '0' COMMENT '版本号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='赠送项目';

-- ----------------------------
--  Table structure for `xm_master_worker`
-- ----------------------------
DROP TABLE IF EXISTS `xm_master_worker`;
CREATE TABLE `xm_master_worker` (
  `id` int(13) NOT NULL AUTO_INCREMENT COMMENT '技师ID',
  `worker_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '技师姓名',
  `worker_tel` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '技师手机号码',
  `worker_email` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '技师邮箱',
  `remark` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `state_id` int(4) DEFAULT '14' COMMENT '职位状态',
  `create_ti` int(13) DEFAULT NULL COMMENT '创建时间',
  `create_user_id` int(13) DEFAULT NULL COMMENT '创建人',
  `modify_ti` int(13) DEFAULT NULL COMMENT '修改时间',
  `modify_user_id` int(13) DEFAULT NULL COMMENT '修改人',
  `version` int(11) DEFAULT '0' COMMENT '版本号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='技师表';

-- ----------------------------
--  Records of `xm_master_worker`
-- ----------------------------
BEGIN;
INSERT INTO `xm_master_worker` VALUES ('1', '高慧敏', null, null, null, '14', null, null, null, null, '0'), ('2', '关来发', null, null, null, '14', null, null, null, null, '0'), ('3', '高江涛', null, null, null, '14', null, null, null, null, '0');
COMMIT;

-- ----------------------------
--  Table structure for `xm_order_info`
-- ----------------------------
DROP TABLE IF EXISTS `xm_order_info`;
CREATE TABLE `xm_order_info` (
  `id` int(13) NOT NULL AUTO_INCREMENT COMMENT '订单ID',
  `category_id` int(13) NOT NULL COMMENT '产品ID',
  `work_id` int(13) NOT NULL COMMENT '技师ID',
  `order_ti` bigint(13) DEFAULT NULL COMMENT '订单日期',
  `pay_status_id` int(4) DEFAULT NULL COMMENT '支付状态：(0:未支付,1支付成功,-1支付失败;2:放弃支付3:已退款;',
  `total_amt` double(13,2) DEFAULT '0.00' COMMENT '订单总金额',
  `total_discount` double(13,2) DEFAULT '0.00' COMMENT '折扣金额',
  `remark` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `state_id` int(4) DEFAULT '14' COMMENT '职位状态',
  `create_ti` int(13) DEFAULT NULL COMMENT '创建时间',
  `create_user_id` int(13) DEFAULT NULL COMMENT '创建人',
  `modify_ti` int(13) DEFAULT NULL COMMENT '修改时间',
  `modify_user_id` int(13) DEFAULT NULL COMMENT '修改人',
  `version` int(11) DEFAULT '0' COMMENT '版本号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='产品订单';

-- ----------------------------
--  Table structure for `xm_prod_category`
-- ----------------------------
DROP TABLE IF EXISTS `xm_prod_category`;
CREATE TABLE `xm_prod_category` (
  `id` int(13) NOT NULL AUTO_INCREMENT COMMENT '产品ID',
  `category_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '产品名称',
  `category_price` double(13,2) DEFAULT '0.00' COMMENT '产品价格',
  `category_vip_price` double(13,2) DEFAULT '0.00' COMMENT '产品会员价',
  `remark` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `state_id` int(4) DEFAULT '14' COMMENT '职位状态',
  `create_ti` int(13) DEFAULT NULL COMMENT '创建时间',
  `create_user_id` int(13) DEFAULT NULL COMMENT '创建人',
  `modify_ti` int(13) DEFAULT NULL COMMENT '修改时间',
  `modify_user_id` int(13) DEFAULT NULL COMMENT '修改人',
  `version` int(11) DEFAULT '0' COMMENT '版本号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='产品表';

-- ----------------------------
--  Records of `xm_prod_category`
-- ----------------------------
BEGIN;
INSERT INTO `xm_prod_category` VALUES ('1', '全身推拿', '50.00', '40.00', null, '14', null, null, null, null, '0'), ('2', '局部推拿', '30.00', '25.00', null, '14', null, null, null, null, '0'), ('3', '小二推拿', '40.00', '0.00', null, '14', null, null, null, null, '0'), ('4', '疏通经络', '88.00', '0.00', null, '14', null, null, null, null, '0'), ('5', '中医艾灸', '30.00', '0.00', null, '14', null, null, null, null, '0'), ('6', '神罐艾灸', '30.00', '0.00', null, '14', null, null, null, null, '0'), ('7', '全身调理', '160.00', '0.00', null, '14', null, null, null, null, '0'), ('8', '妇科调理', '50.00', '0.00', null, '14', null, null, null, null, '0'), ('9', '中药足疗', '25.00', '0.00', null, '14', null, null, null, null, '0'), ('10', '精油开背', '50.00', '0.00', null, '14', null, null, null, null, '0'), ('11', '排淤拔罐', '40.00', '0.00', null, '14', null, null, null, null, '0'), ('12', '脏腑调理', '40.00', '0.00', null, '14', null, null, null, null, '0'), ('13', '刮痧拔罐', '40.00', '0.00', null, '14', null, null, null, null, '0'), ('14', '走罐拔罐', '40.00', '0.00', null, '14', null, null, null, null, '0'), ('15', '脊柱调理', '40.00', '0.00', null, '14', null, null, null, null, '0'), ('16', '乳腺调理', '88.00', '0.00', null, '14', null, null, null, null, '0'), ('17', '烤电', '15.00', '0.00', null, '14', null, null, null, null, '0'), ('18', '盐疗', '15.00', '0.00', null, '14', null, null, null, null, '0');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
